package com.wuxiaofan.secondkill.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wuxiaofan.secondkill.entity.SeckillGoods;
import com.wuxiaofan.secondkill.entity.custom.SeckillGoodsCustom;
import com.wuxiaofan.secondkill.entity.vo.GoodsVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * 秒杀商品表
 */
@Component
public interface SeckillGoodsMapper extends BaseMapper<SeckillGoods> {

    GoodsVO findVoById(@Param("id") String id);

    public List<GoodsVO> findByMap(@Param("map") Map paraMap, Page page);

    public List<GoodsVO> findByMap(@Param("map") Map paraMap);

    public SeckillGoodsCustom findCountByMap(@Param("map") Map paraMap);

    public SeckillGoodsCustom findGroupByMap(@Param("map") Map paraMap);


    public void updateMapById(@Param("map") Map paraMap);
}
